<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- axios完成发送ajax请求 -->
    <script src="vue.min.js"></script>
    <script src="axios.min.js"></script>

    <div id="app"> 
        {{userList}}
    </div>

    <script>
        new Vue({
            el : "#app",
            data:{
                userList:[]
            },
            created() {
                this.getList()
            },
            methods: {
                // axios发送Ajax请求
                getList(){
                       axios.get("data.json")  
                       
                       .then((result) => {
                        // console.log(result);
                       this.userList =  result.data.data
                       console.log(userList);
                       }).catch((err) => {
                        console.log(err);
                        
                       });               
                }
            },
        })

    </script>
</body>
</html>